<?php
 	include("Header.php");
	include("SNManager.class.php");
	$db = new SNDataManager();
?>
<?php
    $result =false;
    $sn = $_REQUEST['txtRefSN'];
    $idcard = $_REQUEST['txtIDCard'];
    $comname = $_REQUEST['txtComName'];
    $comemail = $_REQUEST['txtComEmail'];
    $comtel = $_REQUEST['txtComTel'];
    $comment= $_REQUEST['txtComment'];
	$result = $db->SaveComment($sn,$idcard,$comname,$comemail,$comtel,$comment);
    
     if($result) $msg= "Send Comment Success.";
        else $msg= "Send Comment Failed.";
        echo "<script type='text/javascript'>alert('".$msg."');</script>";
        
        $db->redirect("SearchSNPage.php");
        
 ?> 
 <?php
   include("Footer.php");
?>